package edu.zhku.ttms.domain;

/**
 * @author 泽
 * @since 2021/4/18 22:01
 */

public class Car {
    /**
     * 车辆主键
     */
    private Long carId;

    /**
     * 车牌号
     */
    private String licensePlateNumber;

    /**
     * 车辆行驶证号
     */
    private String carDrivingLicenseNumber;

    /**
     * 车主姓名
     */
    private String ownerName;

    /**
     * 逻辑删除（0：默认，未删除 1：已删除）
     */
    private Integer isDeleted;

    public Car() {}

    public Car(Long carId, String licensePlateNumber, String carDrivingLicenseNumber, String ownerName, Integer isDeleted) {
        this.carId = carId;
        this.licensePlateNumber = licensePlateNumber;
        this.carDrivingLicenseNumber = carDrivingLicenseNumber;
        this.ownerName = ownerName;
        this.isDeleted = isDeleted;
    }

    /**
     * 作为查询的参数列表和插入用的构造函数，无需传id
     */
    public Car(String licensePlateNumber, String carDrivingLicenseNumber, String ownerName) {
        this.licensePlateNumber = licensePlateNumber;
        this.carDrivingLicenseNumber = carDrivingLicenseNumber;
        this.ownerName = ownerName;
    }

    public Car(Long carId, String licensePlateNumber, String carDrivingLicenseNumber, String ownerName) {
        this.carId = carId;
        this.licensePlateNumber = licensePlateNumber;
        this.carDrivingLicenseNumber = carDrivingLicenseNumber;
        this.ownerName = ownerName;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public String getLicensePlateNumber() {
        return licensePlateNumber;
    }

    public void setLicensePlateNumber(String licensePlateNumber) {
        this.licensePlateNumber = licensePlateNumber;
    }

    public String getCarDrivingLicenseNumber() {
        return carDrivingLicenseNumber;
    }

    public void setCarDrivingLicenseNumber(String carDrivingLicenseNumber) {
        this.carDrivingLicenseNumber = carDrivingLicenseNumber;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public String toString() {
        return "Car{" +
                "carId=" + carId +
                ", licensePlateNumber='" + licensePlateNumber + '\'' +
                ", carDrivingLicenseNumber='" + carDrivingLicenseNumber + '\'' +
                ", ownerName='" + ownerName + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }
}
